﻿/***************************************************
 * File name: SaleItem.cs 
 * Author: Team A
 * Change Log: Please see SVN repository: http://test-project-drew1.googlecode.com/svn/trunk/
 * Date: December 2013
 * Description: See <summary> tab below
 * *************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace WSCeCommerce.Domain
{
    /// <summary>
    /// Transition object used to link Sales and items
    /// </summary>
    public class SaleItem
    {

        /// <summary>
        /// Unique ID used to database purposes
        /// </summary>
        public int SaleItemId { get; set; }
    
        /// <summary>
        /// Associated Sale to be linked.
        /// </summary>
        public Sale Sale
        {
            get;
            set;
        }

        public int Item_ItemId {get;set;}
       

        /// <summary>
        /// Associated item to be linked
        /// </summary>
        public Item Item { get; set; }

        /// <summary>
        /// Number of items contained in the sale
        /// </summary>
        public int Quantity
        {
            get;
            set;
        }

        /// <summary>
        /// Price per item. This is copied from the item when the sale is created. 
        /// This allows the item's price to change without affecting any sales in progress
        /// </summary>
        public float Price
        {
            get;
            set;
        }

    }
}
